package com.gitee.slowcreator.module.http.request.intface;

import com.gitee.slowcreator.http.annotation.*;
import com.gitee.slowcreator.http.enums.RequestType;
import com.gitee.slowcreator.http.exception.HttpRequestException;
import com.gitee.slowcreator.http.params.ScBody;
import com.gitee.slowcreator.http.params.ScReturn;

import java.util.Map;
import java.util.Set;

/**
 * @author zxw
 * @date 2023/4/13 下午8:43
 */
public interface ITestHttpEnhance {

    /**
     * 测试实现类 并自定义返回值
     *
     * @param header
     * @param params
     * @param returnHeader
     * @param body
     * @return
     */
    @HttpClient(
            desc = "测试POST",
            url = "http://127.0.0.1:8080/annotationHttp/testPost",
            failThrow = true,
            throwException = HttpRequestException.class,
            timeout = 10000,
            requestType = RequestType.POST
    )
    Map<String, String> testImpl(@HttpHeader Map<String, String> header,
                                 @HttpParams Map<String, String[]> params,
                                 @HttpReturnHeader Set<String> returnHeader,
                                 ScBody body,
                                 @HttpResult ScReturn scReturn);
}
